# -*- coding:utf-8 -*-
import sys



# http://127.0.0.1:5000/users?name=poly&age=14
from flask import Flask, request
from bm import carmove

app = Flask(__name__)
# app.config['ENV'] = "development"

@app.route('/move',methods=["GET","POST"])
def move():
    print('hello')
    motion = request.args['motion']
    speed = request.args['speed']
    print(motion)
    carmove(motion,speed)
    return motion +'successfully!'

@app.route('/hello',methods=["GET","POST"])
def index():
    return '你好 Flask!'


@app.route('/users',methods=["GET","POST"])
def nuaa():
    name = request.args['name']
    age = request.args['age']
    print(name, age)
    return 'Hello ' + name


if __name__ == '__main__':
    app.run(host='0.0.0.0',port=5000)